﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AssetDistributionUpdateParents.aspx.cs" Inherits="PolePosition.v3.WcfService.MapServices.AssetDistributionUpdateParents" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Distribution asset update parent</title>
   
    <style>
        <!--
        html body {border-left: solid steelblue 5px; background-color: White; margin: 0px; padding: 0px; padding-left: 5px; font-family: Arial; font-size: x-small; width: 100%; height: 100%; overflow-x: hidden;}
        .title-main {text-transform: uppercase; font-weight: bold; margin-top: 10px; font-size: medium;}
        .title {text-transform: uppercase; font-weight: bold; margin-top: 10px; font-size: medium;}
        .indent {padding-left: 5px;}
        img.image {margin: 3px;}
        a.image {}
        a.image:hover {}
        .namevalue-table {border: solid gainsboro 1px;}
        td.namevalue-namecell {width: 100px; font-weight: bold; padding: 3px;}
        td.namevalue-valuecell {width: 165px; padding: 3px;}
        .textBox { text-align:right; border-width:1px;border-style:solid;border-color:#000000;width:100px;font-weight: bold; padding: 3px; font-family:Arial;font-size:x-small;height:10px;}
        .button {font-family:Arial;font-size:x-small; height:20px}
        -->
    </style>    
</head>
<body>
    <form id="form1" runat="server">
        <table class="namevalue-table" cellspacing="0" width='90%' cellpadding="0" border='0'>
            <tr>
                <td align="right" colspan='2' >
                    <asp:HyperLink ID="lnkAssetDistribution" runat="server" style='margin-right:10px'>< Back</asp:HyperLink>
                </td>
            </tr>
            <tr>
                <td class="title-main" colspan='2'>
                    <asp:Label ID="LabelAssetId" runat="server"></asp:Label>
                </td>
            </tr>
            <tr style='height:15px'><td></td></tr>
            <tr>
                <td class="namevalue-namecell">Parent Asset #1:</td>
                <td class="namevalue-valuecell">
                    <asp:TextBox ID="TextBoxParentAsset1" CssClass='textBox' runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td></td>
                <td>
                    <asp:RegularExpressionValidator 
                        ID="NumberValidator1" 
                        runat="server" 
                        ControlToValidate="TextBoxParentAsset1" 
                        ErrorMessage="Only numbers are allowed" 
                        ValidationExpression="[0-9]+"
                     />
                </td>
            </tr>
            <tr>
                <td class="namevalue-namecell">Parent Asset #2:</td>
                <td class="namevalue-valuecell">
                    <asp:TextBox ID="TextBoxParentAsset2" CssClass='textBox' runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td></td>
                <td>
                    <asp:RegularExpressionValidator 
                        ID="NumberValidator2" 
                        runat="server" 
                        ControlToValidate="TextBoxParentAsset2" 
                        ErrorMessage="Only numbers are allowed" 
                        ValidationExpression="[0-9]+"
                     />
                </td>
            </tr>            
            <tr>
                <td class="namevalue-namecell">Parent Asset #3:</td>
                <td class="namevalue-valuecell">
                    <asp:TextBox ID="TextBoxParentAsset3" CssClass='textBox' runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td></td>
                <td>
                    <asp:RegularExpressionValidator 
                        ID="NumberValidator3" 
                        runat="server" 
                        ControlToValidate="TextBoxParentAsset3" 
                        ErrorMessage="Only numbers are allowed" ValidationExpression="[0-9]+"
                     />
                </td>
            </tr>              
            <tr>
                <td class="namevalue-namecell">Parent Asset #4:</td>
                <td class="namevalue-valuecell">
                    <asp:TextBox ID="TextBoxParentAsset4" CssClass='textBox' runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td></td>
                <td>
                    <asp:RegularExpressionValidator 
                        ID="NumberValidator4" 
                        runat="server" 
                        ControlToValidate="TextBoxParentAsset4" 
                        ErrorMessage="Only numbers are allowed" ValidationExpression="[0-9]+"
                     />
                </td>
            </tr>              
            <tr>
                <td class="namevalue-namecell">Parent Asset #5:</td>
                <td class="namevalue-valuecell">
                    <asp:TextBox ID="TextBoxParentAsset5" CssClass='textBox' runat="server"></asp:TextBox>
                </td>
            </tr>    
            <tr>
                <td></td>
                <td>
                    <asp:RegularExpressionValidator 
                        ID="NumberValidator5" 
                        runat="server" 
                        ControlToValidate="TextBoxParentAsset5" 
                        ErrorMessage="Only numbers are allowed" ValidationExpression="[0-9]+"
                     />
                </td>
            </tr>                      
            <tr>
                <td colspan='2'>
                    <asp:Label ID="LabelErrorMessage" ForeColor="Red" runat="server" Text='Parent assets were updated succesfully!' Visible='false'></asp:Label>
                    <asp:Label ID="LabelSuccesfullMessage" ForeColor="Green" runat="server" Text='Parent assets were updated succesfully!. Reload the map to show changes.' Visible=false></asp:Label>
                </td>
            </tr>            
            <tr>
                <td class="namevalue-valuecell" colspan='2' align='right'>
                    <asp:Button ID="ButtonUpdateParents" CssClass='button' runat="server" Text="Update" 
                        onclick="ButtonUpdateParents_Click" />
                </td>
            </tr>
        </table>              
    </form>
</body>
</html>
